package com.common.model;

import java.util.ArrayList;
import java.util.List;

public class Result<T> {

    public static final Result  EMPTY =  new Result(0, 0);

    /**
     * code : 0
     * count : 1000
     */

    private int code;
    private int count;

    private String msg;

    private List<T> data = new ArrayList<>();

    public Result() {
    }

    public Result(int code, int count) {
        this.code = code;
        this.count = count;
    }

    public Result(int code, int count, String msg) {
        this.code = code;
        this.count = count;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
